package com.zhiyou100.entity;

import lombok.*;

import java.io.Serializable;

/**
 * @author yang
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class Teacher implements Serializable {
    private String tid;
    private String tname;
    private String tsex;
    /**
     * 一个老师对应一个学校：在老师中定义school引用来指向其学校
     */
    private School school;

    @Override
    public String toString() {
        return "Teacher{" +
                "tid='" + tid + '\'' +
                ", tname='" + tname + '\'' +
                ", tsex='" + tsex + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        return super.equals(o);
    }

    @Override
    public int hashCode() {
        return super.hashCode();
    }
}
